<template>
	<view>
		<view style="padding-top: 60rpx;"></view>
		<view class="Yc">
			<image class="head_portrait" mode="widthFix" :src="head_portrait"></image>
			<view class="full_name">
				<text>姓名:</text>
				<view class="Yz">
					<text>{{name}}</text>
					<view class="full_name_hx"></view>
				</view>
			</view>
			<view class="full_name">
				<text>学号:</text>
				<view class="Yz">
					<text style="padding-left: 10rpx;">{{Student}}</text>
					<view class="full_name_hx"></view>
				</view>
			</view>
			<view class="full_name">
				<text>职务:</text>
				<view class="Yz">
					<text>{{post}}</text>
					<view class="full_name_hx"></view>
				</view>
			</view>
			<image mode="center" class="bottom_chart tmp_cs "
				src="https://vkceyugu.cdn.bspapp.com/VKCEYUGU-baf8b79d-d470-482b-a323-477b967ac823/2c3ce6db-e702-4194-bb5d-9378322e056e.png">
			</image>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				//姓名
				name: "姓名",
				//学号
				Student: "205602410323",
				//职务
				post: "会员",
				//头像
				head_portrait: "../../static/head_portrait.png",
				//数据库 已正式上云 不需要了
				imgArr:[]
			}
		},
		methods: {
			// 当该页面加载时
			onLoad(options) {
				undefined
				let that = this;
				var work_card = options.id;
				console.log(work_card)
				if (options.id) {
					// 该函数用于调用云函数
					// 本云函数是用云查找图片
					uniCloud.callFunction({
						// 云函数名字
						name: 'DB',
						data: {
							// 上传工作牌ID
							work_card: work_card,
							type: "select_work"
						},
						// 当运行成功时
						success(res) {
							res = res.result
							console.log(res)
							that.full_name = res.full_name
							that.full_name = res.full_name;
							// console.log(that)
							that.Position = res.Position;
							that.head_portrait = res.inonPath;
							that.Student_number = res.Student_number;
						},
						fail() {},
						complete() {}
					});
				}
			}
		},
		onNavigationBarButtonTap() { //导航栏登录按钮的转换地址
			uni.navigateTo({
				url: "../Ywork/login/login"
			})
		}
	}
</script>
<style>
	.tmp_cs {
		position: fixed;
		bottom: 0rpx;
	}

	.Yc {
		display: flex;
		flex-direction: column;
		height: 100%;
		width: 100%;
		align-items: center;
		justify-content: center;
		color: #FFFFFF;
	}

	.Yz {
		display: flex;
		flex-direction: column;
		width: 70%;
		height: 80rpx;
		align-items: center; //垂直居中
		/* background-color: #4399FC; */
	}

	.head_portrait {
		/* 照片 */
		color: #FFFFFF;
		width: 295rpx;
		height: 412rpx;
		/* 		圆角属性 */
		border-radius: 4%;
		background: url(../../static/head_portrait.png);
	}

	.full_name {
		/* 姓名 */
		display: flex;
		flex-direction: row;
		padding-top: 60rpx;
		width: 500rpx;
		height: 44rpx;
		font-family: YRDZST-Regular;
		font-size: 50rpx;
		font-weight: normal;
		color: #061E40;
	}

	.full_name_hx {
		/* 直线 1 */
		width: 380upx;
		height: 0upx;
		border: 1rpx solid #9E9E9E;
	}

	.Student_number {
		/* 学号 */
		position: absolute;
		left: 140rpx;
		top: 620rpx;
		width: 500rpx;
		height: 44rpx;
		font-family: YRDZST-Regular;
		font-size: 50rpx;
		font-weight: normal;
		color: #061E40;
	}

	.post {
		/* 职务 */
		position: absolute;
		left: 140rpx;
		top: 770rpx;
		width: 500rpx;
		height: 44rpx;
		font-family: YRDZST-Regular;
		font-size: 50rpx;
		font-weight: normal;
		color: #061E40;
	}



	.bottom_chart {
		/* 波浪底图 */
		min-width: 100%;
	}
</style>
